package com.culturaltourism.core.wraps;

import com.culturaltourism.core.utils.HttpServletUtil;

/**
 * @ClassName: URL
 * @Description: 封装URL地址，自动添加应用上下文路径
 * @Author MaShuai
 * @Date 2019/5/1 19:02
 * @Version V1.0
 */
public class URL {

    private String url;
    public URL(){}

    /**
     * 封装URL地址，自动添加应用上下文路径
     * @param url URL地址
     */
    public URL(String url){
        this.url = HttpServletUtil.getRequest().getContextPath() + url;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
